<template>
  <div class="equipmentSoldDetail">
    <h4>申请信息</h4>
    <table class="table" border="1" rules="all">
      <tr>
        <td>变卖单号</td>
        <td>{{detailForm.soldCode}}</td>
        <td>申请人</td>
        <td>{{detailForm.applyUser}}</td>
      </tr>
      <tr>
        <td>申请时间</td>
        <td colspan="3">{{detailForm.applyDate}}</td>
      </tr>
      <tr class="height">
        <td>变卖理由</td>
        <td colspan="3">{{detailForm.sellInfo}}</td>
      </tr>
    </table>
    <h4>变卖信息</h4>
    <el-table :data="list" border>
      <el-table-column align="center" type="index" label="序号" width="55"/>
      <el-table-column label="设备编号" prop="deviceCode"/>
      <el-table-column label="设备名称" prop="deviceName"/>
      <el-table-column label="类别" prop="category"/>
      <el-table-column label="采购金额" prop="purchaseAmount"/>
      <el-table-column label="当前净值" prop="netWorth"/>
      <el-table-column label="是否报废" prop="isScrap">
        <template slot-scope="scope">
          <template v-if="scope.row.isScrap==1">是</template>
          <template v-if="scope.row.isScrap==2">否</template>
        </template>
      </el-table-column>
      <el-table-column label="预计售卖金额" prop="presellAmount"/>
      <el-table-column label="实际金额" prop="actualAmount"/>
      <el-table-column label="备注" prop="remark"/>
    </el-table>
    <h4>相关文件</h4>
    <div class="fileList"></div>
  </div>
</template>

<script>
    export default {
        name: "equipmentSoldDetail",
      data(){
          return{
            list:[
              {
                deviceCode:'MA2020052000',
                deviceName:'测试',
                category:'CA',
                purchaseAmount:'50',
                netWorth:'5000.00',
                isScrap:'1',
                presellAmount:'100',//预售金额
                actualAmount:'20',//实际金额
                remark:'原因',
              }
            ],
            detailForm:'',
          }
      },
      created() {
        this.detailForm = this.$route.query.data
      },
    }
</script>
<style scoped lang="scss">
  .equipmentSoldDetail {
    margin-left:20px;
    h4 {
      color: #05A380;
    }
    .fileList{
      border: 1px solid #cccccc;
      min-height: 50px;
      width:900px;
    }
    .table {
      width:900px;
      border: 1px solid #cccccc;
      color: #606266;
      font-size: inherit;
      .height {
        height: 120px;
      }
      tr {
        td:nth-child(2n-1) {
          width: 20%;
          text-align: center;
        }

        td:nth-child(2n) {
          width: 30%;
          padding-left: 10px;
        }

        td {
          line-height: 35px;

          .red {
            color: red;
          }
        }
      }
    }
  }
</style>
